export function deepClone (obj) {
  let result = Array.isArray(obj) ? [] : {}
  for (let key in obj) {
    if (obj[key] !== null) {
      if (typeof (obj[key]) === 'object') {
        result[key] = deepClone(obj[key])
      } else {
        result[key] = obj[key]
      }
    } else {
      result[key] = null
    }
  }
  return result
}
